<template>
  <editor
      api-key="zp8z49c5ccu4foqmojhofqjem861jk89xognpifi7woepck1"
      v-model="detail"
      :init="init"
  />
</template>

<script>
import Editor from '@tinymce/tinymce-vue'

export default {
  name: "edit_panel",
  props: ['height', 'select', 'show', 'content'],
  data() {
    return {
      init: {
        select: this.select,
        language_url: '/zh_CN.js', //中文包
        language: 'zh_CN', //中文
        height: this.height ? this.height : 300,
        menubar: false,
        plugins: [
          'advlist autolink lists link image charmap print preview anchor',
          'searchreplace visualblocks code fullscreen',
          'insertdatetime media table paste code help wordcount'
        ],
        toolbar:
            'undo redo | formatselect | bold italic backcolor | \
            alignleft aligncenter alignright alignjustify | \
            bullist numlist outdent indent | removeformat | help'
      },
      detail: ''
    }
  },
  components: {
    'editor': Editor
  }
}
</script>

<style scoped>
</style>
